package com.stlm2.controller;


import com.stlm2.dems.service.FmsFlowService;
import com.stlm2.util.codecontent.CodeContent;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by ZLQ on 2017/6/13.
 */
@Controller
@RequestMapping("/flowC")
public class FlowController {
    @Resource
    public  FmsFlowService fmsFlowService ;

    /*
    *前台获取用户资金流水信息
    * page:页码
    * token：用户token
     */
    @ResponseBody
    @RequestMapping(value="/getUserFmsFlow.json",produces="application/json;charset=UTF-8")
    public String getUserFmsFlow (String companyCode,ModelMap model,String page,String token){
        String data=null;
        try {
            data=fmsFlowService.getUserFmsFlow(model, page, token);
        }catch (Exception e){
            e.printStackTrace();
            return  CodeContent.getModelByCode(0,"查询用户资金流水失败" ,data);
        }
        return data;
    }

    /*
*前台获取用户资金流水信息1.1.0
* page:页码
* token：用户token
 */
    @ResponseBody
    @RequestMapping(value="/getUserFmsFlowV1.1.json",produces="application/json;charset=UTF-8")
    public String getUserFmsFlowV1 (String companyCode,ModelMap model,String page,String token){
        String data=null;
        try {
            data=fmsFlowService.getUserFmsFlowV1(model, page, token);
        }catch (Exception e){
            e.printStackTrace();
            return  CodeContent.getModelByCode(0,"查询用户资金流水失败" ,data);
        }
        return data;
    }

    /*
    *前台获取用户叮当流水信息
    * page:页码
    * token：用户token
     */
    @ResponseBody
    @RequestMapping(value="/getDingDangFlow.json",produces="application/json;charset=UTF-8")
    public String getDingDangFlow (String companyCode,ModelMap model, String page, String token){
        String data=null;

        return data;
    }

    /*
 *前台获取用户叮当流水信息
 * page:页码
 * token：用户token
  */
    @ResponseBody
    @RequestMapping(value="/getDingDangFlowV1.1.json",produces="application/json;charset=UTF-8")
    public String getDingDangFlowV1 (String companyCode,ModelMap model, String page, String token){
        String data=null;

        return data;
    }
}
